# !bin/bash
rm -rf config.log .sconfig.dblite .sconf_temp
#sudo apt install -y gfortran libmotif-dev libhdf5-dev libfftw3-dev libgdal-dev scons python3 cython3 python3-matplotlib python3-h5py python3-gdal python3-pip gdal-bin

export PYTHONPATH=/mnt/e/sfw/sar/isce2/isce2/configuration:$PYTHONPATH
export PYTHONPATH=/mnt/e/sfw/sar/isce2/isce2:$PYTHONPATH
export PYTHONPATH=/mnt/e/sfw/sar/isce2/isce2/components:$PYTHONPATH
export SCONS_CONFIG_DIR=/mnt/e/sfw/sar/isce2/isce2/configuration
rm -rf config.log .sconfig.dblite .sconf_temp
scons install

echo "Copy <contrib/stack> to <your_installation_dir/components/contrib/stack> manually!"

exit
export ISCE_ROOT=/mnt/e/sfw/sar/isce2/
export ISCE_HOME=$ISCE_ROOT/isce/inst
export PATH=$ISCE_HOME/bin:$ISCE_HOME/applications:$PATH
export PYTHONPATH=$ISCE_ROOT:$ISCE_HOME/applications:$ISCE_HOME/component:$PYTHONPATH


# for Python, install gdal with error: gdal_wrap.cpp:2855:22: fatal error: cpl_port.h: No such file or directory
# sudo pip install --global-option=build_ext --global-option="-I/usr/include/gdal" gdal
